package com.nbjtjc.safe.api.safe;

import com.nbjtjc.safe.bean.Result;
import com.nbjtjc.safe.model.safe.RiskMarkItem;
import com.nbjtjc.safe.model.safe.RiskPointItem;
import com.nbjtjc.safe.service.safe.RiskMarkItemServiceImpl;
import com.nbjtjc.safe.service.safe.RiskPointItemServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/safe/riskMarkItem")
@CrossOrigin("*")
public class RiskMarkItemController {


    @Autowired
    private RiskMarkItemServiceImpl riskMarkItemService;

    @PostMapping("add")
    public Result add(@RequestBody  RiskMarkItem markItem){
        return riskMarkItemService.add(markItem);
    }

    @PostMapping("delete")
    public Result delete(@RequestBody  RiskMarkItem riskPointItem){
        return riskMarkItemService.delete(riskPointItem);
    }

    @PostMapping("find")
    public Result find(@RequestBody  RiskMarkItem markItem){
        return riskMarkItemService.find(markItem);
    }
}
